package com.yingyi.basic.util;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 前端分页展示的查询结果数据
 * @param <T>
 */

@ApiModel(description = "分页查询的数据结果")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageList<T> {

    @ApiModelProperty(value = "结果的总条数",required=true, example = "1L")
    private Long totals = 0L;

    @ApiModelProperty(value = "结果集合",required=true)
    private List<T> data = new ArrayList<>();
}
